namespace cnVery.Cms
{
    using cnVery.Cms.Kernel;
    using cnVery.Cms.Release;
    using cnVery.Utils;
    using System;
    using System.Web.UI.WebControls;

    public class adminIndex : Main
    {
        protected Label iframesrc;
        protected Label version;

        private void InitializeComponent()
        {
            base.Load += new EventHandler(this.Page_Load);
        }

        protected override void OnInit(EventArgs e)
        {
            this.InitializeComponent();
            base.OnInit(e);
        }

        private void Page_Load(object sender, EventArgs e)
        {
            string str = base.conn.GetScalar("select count(1) from bbs_user").ToString();
            this.version.Text = Property.Version;
            this.iframesrc.Text = "<iframe src='$SRC' width='500' height='15' frameborder='0' scrolling='no' align='absmiddle'></iframe>";
            Authorization authorization = new Authorization("CVCMS");
            string str2 = authorization.IsRegistered ? "1" : "0";
            string newValue = "http://www.cvcms.cn/service/version_checkupdate.aspx";
            newValue = ((((newValue + "?version=" + base.Server.UrlEncode(this.version.Text)) + "&name=" + base.Server.UrlEncode(Property.Name)) + "&users=" + str) + "&registed=" + str2) + "&sn=" + Config.GetInstant("cnvery.cms.config")["SerialNumber"].Trim().ToUpper();
            this.iframesrc.Text = this.iframesrc.Text.Replace("$SRC", newValue);
            this.iframesrc.Visible = true;
            this.Finish();
        }
    }
}

